﻿@model Zatify.Domain.Data.Message
<script type="text/javascript">
    $(document).ready(function () {

        var blockErrorMessage = $("#blockErrorMessage");

        $("#btnSendMessage").click(function (e) {

            if ($("#Body").val() == "") {

                e.preventDefault();
                blockErrorMessage.html("Enter message body");
                blockErrorMessage.css("display", "block")
            }
        });

        $("#Body").bind('input propertychange', function () {

            blockErrorMessage.show();

            if (this.value.length) {

                blockErrorMessage.hide();
            }
        });
    });

</script>
<div id="blockReplyMessage" class="z_cms_coloum" style="display: none;">
    <h5>
        Reply</h5>
    <div class="add_new_user_form">
        @using (Html.BeginForm("SendReplyMessage", "MessageCenter"))
        {
            @Html.Hidden("repliedMessageId")
            @Html.HiddenFor(m => m.ToUserLogin)
            @Html.HiddenFor(m => m.Subject)
            @Html.TextAreaFor(m => m.Body, new { @class = "z_messages_box" })
            <div class="zatify_panel_btn">
                <input id="btnSendMessage" name="" type="submit" class="btn apps_btn apps_gray_btn" value="Send" />
            </div>
            <div id="blockErrorMessage" class="error_message" style="display: none;"></div>
        }
    </div>
</div>